#pragma once

#include "World.h"
#include "WorldObject.h"
#include "IAnimated.h"
#include "IMovable.h"

#include <boost/optional.hpp>

class Balloon;
class IWorldInfoController;

enum EHumanTypes
  {
  HT_DEFAULT_HUMAN
  };

class Human : public WorldObject, public IAnimated, public IMovable
  {
  private:
    World& m_world;
    IWorldInfoController& m_world_info_controller;
    TVector3 m_direction;
    size_t m_state;
    std::unique_ptr<Balloon> mp_balloon;
  private:
    void _ChangeDirection();
    void _Move(TVector3 i_position);
    TVector3 _GetStep() const;
  public:
    HSMODEL_API Human(World &i_world, EHumanTypes i_type, TVector3 i_position,
                      IWorldInfoController& i_world_info_controller,
                      boost::optional<EBalloonColor> i_color=boost::optional<EBalloonColor>());

    HSMODEL_API void Move() override;
    HSMODEL_API virtual double GetAngleAroundY() const override;
    HSMODEL_API virtual void NextFrame() override;
		HSMODEL_API virtual std::string GetName() const;
    HSMODEL_API virtual void SetPosition(double i_coord_x, double i_coord_y, double i_coord_z) override;
    HSMODEL_API virtual void SetPosition(const TVector3& i_position) override;
    HSMODEL_API const Balloon* GetBalloon() const;
    HSMODEL_API ~Human();
  };